import { App } from "vue";
import Permission from "./permission/permission";
import hasPermi from "./permission/hasPermi";
import hasRole from "./permission/hasRole";


const directiveList: any = {
  // Custom directives
  hasRole, hasPermi, Permission
}
const directives = {
  install: function (app: App<Element>) {
    Object.keys(directiveList).forEach(key => {
      // // consolelog('==================>', key, directiveList[key]);

      // 注册自定义指令
      app.directive(key, directiveList[key]);
    })
  }
}

export default directives

